<template>
    <div class="Box">
        <div>
            <img :src="props.cover" />
            <span>{{ props.media_count }}</span>
        </div>
        <div>{{ props.title }}</div>
    </div> 
</template>

<script lang="ts" setup>
interface Props{
    cover:string
    media_count:number  //数量
    title:string

}
const props = defineProps<Props>()
</script>

<style lang="scss" scoped>
.Box{
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 15px 0;
    & div:nth-child(1){
        position: relative;
        height: 152px;
        border: 1px solid var(--el-border-color);
        border-radius: 4px;
    }
    & div:nth-child(1) img:nth-child(1){
        width: 100%;
        height: 100%;
        border-radius: 4px;
        object-fit: cover;
    }
    & div:nth-child(1) span:nth-child(2){
        position: absolute;
        top: 10px;
        right: 10px;
        border-radius: 4px;
        padding: 0 5px;
        font-size: 13px;
        background: rgb(0, 0, 0,0.5);
        color: white;
    }
    & div:nth-child(2){
        line-height: 24px;
        width: 100%;
        color: #222222;
        font-size: 17px;
        text-align: left;
    }
}
</style>